<?php
/**
 * 変換クラス convert_base class.
 *
 * @date 2008/07/01
 * @author nagai
 * @version $Id: convert_base.php 27 2009-11-26 06:53:05Z tzr250rsp $
 */
class convert_base {


  /**
   * 文字コードを変換します.
   * @param mixed $str
   * @return mixed
   */
  static protected function _encoding($str,$encod,$from_encoding=null){
    if(null == $from_encoding){
      $from_encoding = "UTF-8,sjis-win,SJIS,EUC-JP";
    }
    return mb_convert_encoding($str,$encod,$from_encoding);
    //return mb_convert_encoding($str,$encod,mb_detect_order());
    //return mb_convert_encoding($str,$encod,'auto');
  }
}
//end of class



?>